package com.xiaotu.Mapper;

import com.xiaotu.pojo.Comment;
import org.apache.ibatis.annotations.*;

@Mapper
public interface CommentMapper {
    @Select("select * from t_comment where id = #{id}")
    public Comment findById(Integer id);
    @Insert("insert into t_comment(content,author,a_id) values(#{content},#{author},#{aId})")
    public Integer insertComment(Comment comment);
    @Update("update t_comment set content=#{content} where id=#{id}")
    public Integer updateComment(Comment comment);
    @Delete("delete from t_comment where id = #{id}")
    public Integer deleteComment(Integer id);
}
